<!doctype html><html xmlns="http://www.w3.org/1999/xhtml" id="html">
    <head>
        <title></title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <base href="<?= base_url(1); ?>" />
        <link type="text/css" href="css/main.css?v=<?= $config['version'] ?>" rel="stylesheet" />
    </head>
    <body>
        <?php include(VIEWPATH . 'common/main_header.php'); ?>
        <div class="datalist"><table id="flexigrid" style="display:none"></table></div>
        <script type="text/javascript">
            $(function(){
                $("#flexigrid").flexigrid($.extend(SG.flexOptions, {
                    url: '<?= site_url('role/role/flexigrid') ?>',
                    colModel : [
                        {display: 'ID', name : 'id', width : '250', iskey:true},
                        {display: '<?= translate('ROLE_ROLE_NAME') ?>', name : 'name', width : '15%'},
                        {display: '<?=  translate('ROLE_ROLE_RANK')?>', name : 'rank', width : '80'},
                        {display: '<?=  translate('ROLE_ROLE_FATHER_ID')?>', name : 'father_id', width : '10%'},
                        {display: '<?=  translate('CREATETIME')?>', name : 'createtime', width : '10%', hide:true},
                        {display: '<?=  translate('MODIFYTIME')?>', name : 'modifytime', width : '10%', hide:true},
                        {display: '<?=translate('MANAGE')?>', name : 'id', width : '12%',  sortable: false, process: formatOp},
                    ],
                    buttons: [
                        <?php if(check_level_menu(50, 'role', 'role', 'add')){?>
                        { name: 'add', displayname: "<?=translate('ADD')?>", title: "<?=translate('ADD')?>", bclass: 'add', onpress: multi },
                        <?php }?>
                    ],
                    searchitems : true,
                    sortname: "rank",
                    sortorder: "desc",
                }));
                SG.admin = $.extend(SG.admin,{
                    multi_url:'<?= site_url("role/role/multi/") ?>',
                    table:'{pre}role'
                });
                <?php if(check_level_menu(50, 'role', 'role', 'add')){?>
                    SG.admin.add_url = '<?= site_url("role/role/add/") ?>';
                <?php }?>
                <?php if(check_level_menu(50, 'role', 'role', 'edit')){?>
                    SG.admin.edit_url = '<?= site_url("role/role/edit/") ?>';
                <?php }?>
                <?php if(check_level_menu(50, 'role', 'role', 'del')){?>
                    SG.admin.del_url = '<?= site_url("role/role/del/") ?>';
                <?php }?>
            });
        </script>
    </body>
</html>